<?php

/**
 * A class that wraps another object for custom callbacks and events
 *
 * @author albertdiones@gmail.com
 */
ABSTRACT CLASS add_object_wrapper {

   /**
    * The property variable for the wrapped instance
    *
    */
   protected $qE7u8afa4u_add_wrapped_instance;

   /**
    * Sets the wrapped instance
    *
    */
   public function __construct($object) {
      $this->qE7u8afa4u_add_wrapped_instance = $object;
   }

   /**
    * Overloading: __call
    * calls a method of the wrapped instance
    *
    * @param string $name
    * @param array $argumens
    *
    * @see http://php.net/manual/en/language.oop5.overloading.php#object.call
    * "Triggered when invoking inaccessible methods in an object context"
    *
    */
   public function __call($name, $arguments) {
      return call_user_func_array(array($this->qE7u8afa4u_add_wrapped_instance, $name),$arguments);
   }

   /**
    * Overloading: __get
    * gets a property of the wrapped instance
    *
    * @param string $name
    *
    *
    * @see http://php.net/manual/en/language.oop5.overloading.php#object.get
    * "Utilized for reading data from inaccessible properties"
    *
    */
   function __get( $name ) {
      return $this -> qE7u8afa4u_add_wrapped_instance -> $name;
   }

   /**
    * Overloading: __set
    * sets a property of the wrapped instance
    *
    *
    * @see http://php.net/manual/en/language.oop5.overloading.php#object.set
    * "Run when writing data to inaccessible properties. "
    *
    */
   function __set($name, $value) {
      $this -> qE7u8afa4u_add_wrapped_instance -> $name = $value;
   }

   /**
    * Magic function __isset()
    *
    * @param mixed $name (scalar values only)
    *
    * @see http://www.php.net/manual/en/language.oop5.overloading.php#object.isset
    * @since ADD MVC 0.0
    */
   public function __isset($name) {
      return isset( $this -> qE7u8afa4u_add_wrapped_instance -> $name );
   }

   /**
    * Magic function __unset()
    *
    * @param mixed $varname (scalar values only)
    * @see http://www.php.net/manual/en/language.oop5.overloading.php#object.unset
    * @since ADD MVC 0.0
    */
   public function __unset($name) {
      unset( $this -> qE7u8afa4u_add_wrapped_instance -> $name );
   }



}